#include <iostream>
using namespace std;

#include "adtMeasure.h"

int main()
{
	using namespace doa14;

	/*adtMeasure<int> i(100, 5);
	adtMeasure<double> d(50, 5);

	cout << i << endl;
	cout << d << endl << endl;*/

	adtMeasure<double> i1(0.002, 1);
	adtMeasure<double> u1(5, 1);
	cout << "I = " << i1 << endl;
	i1.print();
	cout << "U = " << u1 << endl;
	u1.print();	

	adtMeasure<double> p1 = u1 * i1;
	adtMeasure<double> r1 = u1 / i1;
	cout << "P = U * I = " << p1 << endl;
	u1.print();
	cout << "R = U / I = " << r1 << endl;
	r1.print();
	cout << endl;

	adtMeasure<double> i2(0.002, 2);
	adtMeasure<double> u2(5, 2);
	cout << "I = " << i2 << endl;
	i2.print();
	cout << "U = " << u2 << endl;
	u2.print();	

	adtMeasure<double> p2 = u2 * i2;
	adtMeasure<double> r2 = u2 / i2;
	cout << "P = U * I = " << p2 << endl;
	u2.print();
	cout << "R = U / I = " << r2 << endl;
	r2.print();
	cout << endl;

	adtMeasure<double> i3(0.002, 4);
	adtMeasure<double> u3(5, 2);	
	cout << "I = " << i3 << endl;
	i3.print();
	cout << "U = " << u3 << endl;
	u3.print();

	adtMeasure<double> p3 = u3 * i3;
	adtMeasure<double> r3 = u3 / i3;
	cout << "P = U * I = " << p3 << endl;
	p3.print();
	cout << "R = U / I = " << r3 << endl;
	r3.print();
	cout << endl;

	system("pause");
	return 0;
}